<template>
    <div class="box">
        <div class="head">
            <span>热销爆款</span>
            <span class="right">查看更多
                <span class="iconfont icon-xiangyou1"></span>
            </span>
        </div>
        <div class="content">
            <div class="contentbox" v-for="(good,index) in content" :key="index">
                
                <div class="headline">{{good.name}}</div>
                <div class="profile">{{good.profile}}</div>
                <div class="price">
                    <span class="nowprice">￥{{good.new}}</span>
                    <span class="oldprice">￥{{good.old}}</span>
                </div>
                <div class="label">{{good.label}}</div>
                <img :src="good.img" alt="">
            </div>

        </div>

    </div>
</template>

<script>
//chuang
export default {
    name:"HotDian",
    data(){
        return{
            content:[
                {
                    name:"小米新三级空调",
                    profile:"变频节能巨省电，来买呀",
                    new:"1999",
                    old:"2199",
                    label:"高性价比",
                    img:"https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/5eee1be9900e970b3ea4c0343d930424.jpg?thumb=1&w=280&h=280"
                },
                {
                    name:"小米新三级空调",
                    profile:"变频节能巨省电，来买呀",
                    new:"1999",
                    old:"2199",
                    label:"高性价比",
                    img:"https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/5eee1be9900e970b3ea4c0343d930424.jpg?thumb=1&w=280&h=280"
                },
                {
                    name:"小米新三级冰箱",
                    profile:"变频节能巨省电，来买呀",
                    new:"1999",
                    old:"2199",
                    label:"高性价比",
                    img:"https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/6852696ece843f1a1f9667e21bb09c71.jpg?thumb=1&w=280&h=280"
                },
                {
                    name:"小米新三级冰箱",
                    profile:"变频节能巨省电，来买呀",
                    new:"1999",
                    old:"2199",
                    label:"高性价比",
                    img:"https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/6852696ece843f1a1f9667e21bb09c71.jpg?thumb=1&w=280&h=280"
                },
                {
                    name:"小米新五级空调",
                    profile:"变频节能巨省电，来买呀",
                    new:"1999",
                    old:"2199",
                    label:"高性价比",
                    img:"https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/1244196903a9c81c0d41f462ff719ded.jpg?thumb=1&w=280&h=280"
                },
                {
                    name:"小米新六级空调",
                    profile:"变频节能巨省电，来买呀",
                    new:"1999",
                    old:"2199",
                    label:"高性价比",
                    img:"https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/1244196903a9c81c0d41f462ff719ded.jpg?thumb=1&w=280&h=280"
                }
                
            ]
        }
    }
}
</script>

<style scoped>
.box{
  width: 100%;
  padding: 0 0.1rem;
  display: flex;
  flex-direction: column;
  margin-top: .1rem;
  box-sizing: border-box;
  background-color: transparent;
}
.head{
    width: 100%;
    display: flex;
    justify-content: space-between;
        line-height: .22rem;
}
.right{
    font-size: 12px;
    color: rgb(185, 176, 176);

}
.content{
    width: 100%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    background-color: white;
}
.contentbox{
    width: 50%;
    box-sizing: border-box;
    padding-left: .05rem;
    position: relative;
    margin-top: .1rem;
    padding: .1rem 0;
    
}
.headling{
    font-size: 14px;
    width: 95%;
    margin: 0 auto;
    overflow: hidden;
}
.profile{
    font-size: 12px;
    color: rgb(187, 184, 184);
    width: .94rem;
    overflow: hidden;
    white-space: nowrap;
}
.nowprice{
    font-size: 14px;
    margin-top: .1rem;
}
.oldprice{
    font-size: .1rem;
    color: rgb(214, 212, 212);
    text-decoration-line: line-through;
}
.label{
    height: .16rem;
    color: white;
    background-color: rgb(238, 66, 66);
    border-radius: .03rem;
    display: inline-block;
    font-size: 12px;
}

img{
    width: .75rem;
    height: .75rem;
    position: absolute;
    right: 0;
    top: 0;
}

</style>